#include "base_player.h"
#include "game_base_msg.h"
BasePlayer::BasePlayer(void)
{
	m_connection = NULL;
	m_room = NULL;
	m_desk = NULL;
	m_isLogin = false;
	m_isGuest = false;
	m_chairId = -1;
}

BasePlayer::~BasePlayer(void)
{
}

void BasePlayer::getPlayerInfoMsg(BaseMsgPlayerInfo* info) {
	info->isGuest = m_isGuest;
	info->userName = m_userName;
	info->score = m_score;
	info->nickName = m_nickName;
}

void BasePlayer::sendData(int mainCmd, int subCmd, void* data, int len) {
	m_connection->SendData(mainCmd, subCmd, data, len);
}

void BasePlayer::sendRoomData(void* data, int len) {
	m_connection->SendData(1, 1, data, len);
}
void BasePlayer::sendDeskData(void* data, int len) {
	m_connection->SendData(2, 1, data, len);
}